package io.gitee.zhucan123.core.infrastructure.exception.advice;

import com.niimbot.middlend.core.infrastructure.exception.OverLengthException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: zhuCan
 * @date: 2019/8/24
 * @description:
 */
//@RestControllerAdvice
public class OverLengthExceptionAdvice extends AbstractExceptionAdvice<OverLengthException> {


  @Override
  @ExceptionHandler(OverLengthException.class)
  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  public ErrorDTO exceptionHandler(HttpServletRequest req, OverLengthException ex) {
    return super.baseExceptionHandler(req, ex);
  }
}
